package com.gexiaobao.pigeon.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.gexiaobao.pigeon.R
import com.gexiaobao.pigeon.app.model.bean.FlyWeatherInfoResponse

/**
 * @Author      : hxw
 * @Date        : 2023/3/17 8:30
 * @Describe    :
 */
class MapWeatherAdapter(data: ArrayList<FlyWeatherInfoResponse.WeatherListInfo>) :
    BaseQuickAdapter<FlyWeatherInfoResponse.WeatherListInfo, BaseViewHolder>(R.layout.item_map_weather) {

    override fun convert(holder: BaseViewHolder, item: FlyWeatherInfoResponse.WeatherListInfo) {
        holder.setText(R.id.tv_item_map_weather_area, item.district)
        holder.setText(R.id.tv_item_map_weather, item.weather)
        holder.setText(R.id.tv_item_map_weather_temper, item.temperature)
        holder.setText(
            R.id.tv_item_map_weather_wind,
            item.winddirection + context.getString(R.string.wind) + item.windpower + context.getString(R.string.level)
        )
    }
}